home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 23
/
AACD 23.iso
/
AACD
/
Programming
/
tek
/
msg
/
ackmsg.c
next >
Wrap
C/C++ Source or Header
|
2001-05-12
|
596b
|
40 lines
#include "tek/msg.h"
#include "tek/kn/exec.h"
/*
** TEKlib
** (C) 2001 TEK neoscientists
** all rights reserved.
**
** TVOID TAckMsg(TAPTR msg)
**
** acknowledge a message to sender.
**
*/
TVOID TAckMsg(TAPTR mem)
{
if (mem)
{
TMSG *msg = ((TMSG *) mem) - 1;
TPORT *replyport = msg->replyport;
if (replyport)
{
msg->status = TMSG_STATUS_ACKD | TMSG_STATUS_PENDING;
kn_lock(&replyport->lock);
TAddTail(&replyport->msglist, (TNODE *) msg);
TSignal(replyport->sigtask, replyport->signal);
kn_unlock(&replyport->lock);
}
else
{
TMMUFreeHandle(msg);
}
}
}